#include "gtest/gtest.h"
#define private public
#define protected public
#include "Allocator.h"


TEST(AllocatorTest, outOfMemory){
	AllocatorImpl<8> a;
	EXPECT_EQ(a.alloc(9), static_cast<const char*>(0));
}

TEST(AllocatorTest, outOfMemory2){
	AllocatorImpl<8> a;
	a.alloc(2);
	a.alloc(3);
	a.alloc(3);
	EXPECT_EQ(a.alloc(1), static_cast<const char*>(0));
}